<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="jquery-ui.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script type="text/javascript" >
	$(document).ready(function(){
		$("#reportChooser").hide() ;
		//添加事件
		$(".reportRadio").each(function(){
			$(this).bind("click",function(){
				$(this).find("input").attr("checked",true) ;
			}) ;
		});
	});
	function removeRecord(){
	}
	function updateReportName(source){
		var value = $("input[name=reportName]:checked").val() ;
		if(value){
			$(source).text(value) ;
		}
	}
	function chooseReport(source){
		$("#reportChooser").dialog({
			title:"请选择报表",
			resizable:false,
			width:300,
			height:200,
			modal:true,
			buttons:[
				{text:"确定",click:function(){updateReportName(source);$(this).dialog("close")} },
				{text:"取消",click:function(){$(this).dialog("close")} }
			         ]
			}) ;
		var msg = $("#reportChooser").parent().html() ;
		
	}
</script>

<style>
	.container{
		border:solid 1px #000000 ;
		width:200px;
		height:300px ;
	}
	th,td{
		border:solid 1px #000000 ;
	}
	.reportRadio{
		float:left ;
		width:80px ;
		height:20px ;
		cursor:pointer
	}
	.buttonDiv{
		text-align: center ;
		width:50%
		height:20px ;
	}
	.selectRadio{
		background-color: #FF0000 ;
	}
</style>
</head>
<body>
	<table style="border-collapse:collapse;">
		<thead>
			<tr>
				<th>
					编号
				</th>
				<th>
					姓名
				</th>
				<th>
					报表
				</th>
				<th>
					删除
				</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>01</td>
				<td>张三</td>
				<td 
					style="cursor:pointer;" 
					onClick="javascirpt:chooseReport(this)">
					保费表
				</td>
				<td style="cursor:pointer;text-align:center" 
					onClick="javascript:removeRecord(this)">
				-
				</td>
			</tr>
			<tr>
				<td>02</td>
				<td>李四</td>
				<td  style="cursor:pointer;" 
					onClick="javascirpt:chooseReport(this)">
					保费表
				</td>
				<td style="cursor:pointer;text-align:center" 
					onClick="javascript:removeRecord(this)">
				-
				</td>
			</tr>
		</tbody>
	</table>
	<div id="reportChooser">
		<div class="reportRadio">
			<input type="radio" name="reportName" value="保费表" />
			保费表
		</div>
		<div class="reportRadio">
			<input type="radio" name="reportName" value="保额表" />
			保额表
		</div>
	</div>
</body>
</html>